<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数据库</title>
</head>
<body>
  <script>
    let db, request, version = 1;

    request = indexedDB.open('admin', version);
    request.onerror = event => console.log(`Failed to open: ${event.target.errorCode}`);
    request.onsuccess = event => db = event.target.result;
  </script>
</body>
</html>